const tabLeftImage = document.getElementsByClassName("tab-left-image")[0],
  tabRightImage = document.getElementsByClassName("tab-right-image")[0],
  tabLeftText = document.getElementsByClassName("tab-left-text")[0],
  tabRightText = document.getElementsByClassName("tab-right-text")[0];

console.log(tabLeftButton);
console.log(tabRightButton);

function clickTabLeftButton() {
  // 左边字体变粗
  tabLeftText.className = "tab-left-text selected";
  // 右边字体变细
  tabRightText.className = "tab-right-text";
  // 右选中图片消失
  tabRightImage.className = "tab-left-image gradient-transe-left-hide";
  // 左边选中图片从左到右移动、缓慢展示
  tabLeftImage.className = "tab-left-image gradient-transe-left-show";
}

function clickTabRightButton() {
  // 左边字体变细
  tabLeftText.className = "tab-left-text";
  // 右边字体变粗
  tabRightText.className = "tab-right-text selected";
  // 左边选中图片消失
  tabLeftImage.className = "tab-left-image gradient-transe-left-hide";
  // 右边选中图片从左到右移动、缓慢展示
  tabRightImage.className = "tab-right-image gradient-transe-right-show";
}
